<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>127-window相关事件.html</title>
	<style>
		*{
			margin: 0;
			padding: 0;
		}
		body{
			width: 3000px;
			height: 3000px;
		}
	</style>
</head>
<body>
	
</body>
<script>
	/*
	window.onresize = function(){
		console.log(1);
	}
	*/
	var i =0;
	/*
	window.onscroll = function(){
		console.log(i++);
	}
	*/
	window.onload = function(){
		console.log(++i);
	}
</script>
</html>